package com.taldh.design.patterns.singleton;

/**
 * thread safe
 *
 * date: 2020/5/24
 *
 * @author 袁小黑
 * @version 1.0.0
 */

public enum SingletonEnum  {

    INSTANCE();

    private static int logicInteger;

    SingletonEnum() {
        // first, set constructor in primary invoke
        //throw new RuntimeException("prevent getting constructor by reflection!");
    }

    public static int getLogicInteger() {
        return logicInteger;
    }
}
